﻿using System.Runtime.InteropServices;

namespace AdTech.Snap.Interop
{
    [StructLayout(LayoutKind.Sequential)]
    internal struct MONITORINFO
    {
        // Properties
        public uint Size { get; set; }
        public RECT Monitor { get; set; }
        public RECT WorkArea { get; set; }
        public uint Flags { get; set; }
        public const uint MONITORINFOF_PRIMARY = 0x00000001;

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
        public void Init()
        {
            this.Size = (uint)Marshal.SizeOf(typeof(MONITORINFO));
        }
    }
}
